﻿using Abp.Application.Services;
using Abp.AspNetCore.Mvc.Authorization;
using AbpZeroTemplate.Authorization;
using AbpZeroTemplate.Tenants.Dashboard;
using AbpZeroTemplate.Tenants.Dashboard.Dto;
using AbpZeroTemplate.Web.Controllers;
using AbpZeroTemplate.Web.Swagger;
using Microsoft.AspNetCore.Mvc;

namespace AbpZeroTemplate.Api.Admin.Controllers
{
    /// <summary>租户仪表
    /// </summary>
    [Area("Admin")]
    [Route("Admin/TenantDashboard/[action]")]
    [ApiName("Admin")]
    [RemoteService]
    [AbpMvcAuthorize(AppPermissions.Pages_Tenant_Dashboard)]
    public class TenantDashboardController : AbpZeroTemplateControllerBase
    {
        private readonly ITenantDashboardAppService _tenantDashboardAppService;
        /// <summary>
        /// </summary>
        public TenantDashboardController(ITenantDashboardAppService tenantDashboardAppService)
        {
            _tenantDashboardAppService = tenantDashboardAppService;
        }

        /// <summary>获取活跃的用户
        /// </summary>
        [HttpGet]
        public GetMemberActivityOutput GetMemberActivity()
        {
            return _tenantDashboardAppService.GetMemberActivity();
        }

        [HttpGet]
        public GetDashboardDataOutput GetDashboardData(GetDashboardDataInput input)
        {
            return _tenantDashboardAppService.GetDashboardData(input);
        }

        [HttpGet]
        public GetSalesSummaryOutput GetSalesSummary(GetSalesSummaryInput input)
        {
            return _tenantDashboardAppService.GetSalesSummary(input);
        }

        //[HttpGet]
        //public GetWorldMapOutput GetWorldMap(GetWorldMapInput input)
        //{
        //    return _tenantDashboardAppService.GetWorldMap(input);
        //}

        [HttpGet]
        public GetGeneralStatsOutput GetGeneralStats(GetGeneralStatsInput input)
        {
            return _tenantDashboardAppService.GetGeneralStats(input);
        }



    }
}
